Developer Documentation

QuickTime 4 API Documentation

Inside Macintosh: Sound

| Previous | Chapter contents | Chapter top | Section top | Next |

Gestalt Selector and Response Bits

You can pass the gestaltSoundAttr selector to the Gestalt function to determine information about the sound capabilities of a Macintosh computer.

CONST
    gestaltSoundAttr                    = 'snd ';       {sound attributes selector}

The Gestalt function returns information by setting or clearing bits in the response parameter. The bits currently used are defined by constants. Note that most of these bits provide information about the built-in hardware only.

Bits 7 through 12 are not defined for versions of the Sound Manager prior to version 3.0.

CONST
    gestaltStereoCapability             = 0;        {built-in hw can play stereo sounds}
    gestaltStereoMixing                 = 1;        {built-in hw mixes stereo to mono}
    gestaltSoundIOMgrPresent            = 3;        {sound input routines available}
    gestaltBuiltInSoundInput            = 4;        {built-in input hw available}
    gestaltHasSoundInputDevice          = 5;        {sound input device available}
    gestaltPlayAndRecord                = 6;        {built-in hw can play while recording}
    gestalt16BitSoundIO                 = 7;        {built-in hw can handle 16-bit data}
    gestaltStereoInput                  = 8;        {built-in hw can record stereo sounds}
    gestaltLineLevelInput               = 9;        {built-in input hw needs line level}
    gestaltSndPlayDoubleBuffer          = 10;       {play from disk routines available}
    gestaltMultiChannels                = 11;       {multiple channels of sound supported}
    gestalt16BitAudioSupport            = 12;       {16-bit audio data supported}

Constant descriptions

gestaltStereoCapability
Set if the built-in sound hardware is able to produce stereo sounds.
gestaltStereoMixing
Set if the built-in sound hardware mixes both left and right channels of stereo sound into a single audio signal for the internal speaker.
gestaltSoundIOMgrPresent
Set if the Sound Input Manager is available.
gestaltBuiltInSoundInput
Set if a built-in sound input device is available.
gestaltHasSoundInputDevice
Set if a sound input device is available. This device can be either built-in or external.
gestaltPlayAndRecord
Set if the built-in sound hardware is able to play and record sounds simultaneously. If this bit is clear, the built-in sound hardware can either play or record, but not do both at once. This bit is valid only if the gestaltBuiltInSoundInput bit is set, and it applies only to any built-in sound input and output hardware.
gestalt16BitSoundIO
Set if the built-in sound hardware is able to play and record 16-bit samples. This indicates that built-in hardware necessary to handle 16-bit data is available.
gestaltStereoInput
Set if the built-in sound hardware can record stereo sounds.
gestaltLineLevelInput
Set if the built-in sound input port requires line level input.
gestaltSndPlayDoubleBuffer
Set if the Sound Manager supports the play-from-disk routines.
gestaltMultiChannels
Set if the Sound Manager supports multiple channels of sound.
gestalt16BitAudioSupport
Set if the Sound Manager can handle 16-bit audio data. This indicates that software necessary to handle 16-bit data is available.

For complete information about the Gestalt function, see the chapter "Gestalt Manager" in Inside Macintosh: Operating System Utilities .


© 1999 Apple Computer, Inc.

| Previous | Chapter contents | Chapter top | Section top | Next |